﻿namespace DimensionsHelper.LanguageService.Syntax;

/// <summary>
///     空表达式
/// </summary>
public class EmptyExpression : Expression
{
    private EmptyExpression(SyntaxNode? parent) : base(SyntaxKinds.EmptyExpression, parent)
    {
    }

    internal EmptyExpression(int start, SyntaxNode? parent) : this(parent)
    {
        Update(start, 0);
    }


    /// <summary>
    ///     默认的空表达式
    /// </summary>
    public static EmptyExpression Default { get; } = new(null);
}


public static partial class NodeFactory
{
    public static EmptyExpression CreateEmptyExpression(int position)
    {
        return new EmptyExpression(position, null);
    }
}